<?php
    require_once('../includes/DbConnector.php');
    
    if(isset($_GET['action']) && !empty($_GET['action'])) {
        // INPUT DATA.
        $action = $_GET['action'];
        $userid = $_GET['userid'];
        $connector  = new DbConnector();
        $sql = "select
                ua.*
                from user_account ua, user_ranking ur
                where ua.user_id = '$userid'
                and ua.user_ranking_id = ur.user_ranking_id";
        $result = $connector->query($sql);
        
        $a = mysql_fetch_assoc($result);
        
        echo json_encode($a);
    }
?>